{extend name="layout" /}

{block name="title"}登录{/block}
{block name="style"}
<script>if(window.top !== window.self){ window.top.location = window.location;}</script>
<link href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/backend/css/concept.min.css" rel="stylesheet">
<link rel="stylesheet" href="/static/backend/css/login.css">

{/block}

{block name="content"}

<div class="login">
        <div class="login-box">
            <div class="login-header">
                <h3>登陆</h3>
            </div>
            <div class="login-body">
                <form action="" onsubmit="return false">
                    <div class="form-group">
                        <input type="text" class="form-control" value="" id="username" placeholder="用户名">
                    </div>
                    <div class="form-group">
                        <input type="password" class="form-control" value="" id="password" placeholder="密码">
                    </div>
                    <div class="form-group captcha">
                        <input type="text" class="form-control" value="" id="captcha" placeholder="验证码">
                        <img id="captcha_img" src="{:captcha_src()}" onclick="$(this).attr('src','{:captcha_src()}?tm='+Math.random())" alt="captcha" />
                    </div>
                    <div>
                        <p class="msg"></p>
                        <button type="submit" id="login" class="btn btn-block">登录</button>
                    </div>
                </form>
            </div>
        </div>
</div>
{/block}

{block name="script"}
<script>
    let config = {
        "submit_url" : "{:url('login/submit')->build()}",
        "home_url" : "{:url('index/index')->build()}",
    };
</script>
<script src="/static/backend/js/login.js"></script>
{/block}
